package cn.itsource.service.impl;

import cn.itsource.pojo.domain.DriverWallet;
import cn.itsource.mapper.DriverWalletMapper;
import cn.itsource.service.IDriverWalletService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 司机的钱包 服务实现类
 * </p>
 *
 * @author tom
 * @since 2024-03-14
 */
@Service
public class DriverWalletServiceImpl extends ServiceImpl<DriverWalletMapper, DriverWallet> implements IDriverWalletService {

    @Override
    public void create(Long id) {
        DriverWallet wallet = new DriverWallet()
                .setId(id)
                .setAmount(BigDecimal.ZERO)
                .setCreateTime(new Date());
        super.save(wallet);
    }
}
